Skip to content

feat: support fullUrl in EndpointConfiguration to bypass default signal path appending#1723

Open
Cloud-Architect-Emma wants to merge 1 commit into
open-telemetry:mainfrom
Cloud-Architect-Emma:fix-custom-signal-url-v2
Open

feat: support fullUrl in EndpointConfiguration to bypass default signal path appending#1723
Cloud-Architect-Emma wants to merge 1 commit into
open-telemetry:mainfrom
Cloud-Architect-Emma:fix-custom-signal-url-v2

Conversation

@Cloud-Architect-Emma
Copy link
Copy Markdown

Fixes #1712

Summary

When using HttpExportConfiguration, the signal-specific paths (/v1/logs,
/v1/traces, /v1/metrics) are always appended to the base URL. This makes
it impossible to use a custom endpoint path like /v2/logs.

This PR adds a fullUrl property to EndpointConfiguration that, when set,
bypasses the automatic path appending and uses the provided URL as-is.

Usage

httpExport {
    baseUrl = "https://example.com"
    logs {
        fullUrl = "https://example.com/v2/logs"  // used as-is, no path appended
    }
    // traces still uses: https://example.com/v1/traces
    // metrics still uses: https://example.com/v1/metrics
}

Changes

  • Added fullUrl: String? property to EndpointConfiguration
  • Updated HttpExportConfiguration to use fullUrl when set, falling back
    to existing url + path behaviour
  • Updated HttpEndpointConnectivity.forTraces/forLogs/forMetrics to accept
    a fullUrl flag
  • Fixed detekt violations (trailing commas, line length)
  • Added tests covering the new behaviour

Notes

This supersedes PR #1715 which had CLA identity issues.

@Cloud-Architect-Emma Cloud-Architect-Emma requested a review from a team as a code owner May 5, 2026 21:00
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented May 5, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: Cloud-Architect-Emma / name: Emmanuela Opurum (b930b22)

@Cloud-Architect-Emma
Copy link
Copy Markdown
Author

/easycla

@Cloud-Architect-Emma Cloud-Architect-Emma force-pushed the fix-custom-signal-url-v2 branch 7 times, most recently from 08e18f9 to 3f88171 Compare May 6, 2026 02:26
@Cloud-Architect-Emma
Copy link
Copy Markdown
Author

Cloud-Architect-Emma commented May 6, 2026

Hi @breedx-splk, quick update, the line endings and detekt issues are
now fixed! EasyCLA is passing.

The only remaining blocker is a conflict in android-agent/api/android-agent.api.
This file is auto-generated by Gradle and I'm unable to run it locally
without the Android SDK set up.

Could you resolve it by running:

./gradlew :android-agent:apiDump

and pushing to my branch? That should be the very last thing needed
before this PR is ready for review.

I'm really sorry for all the trouble and deeply appreciate your patience.
Thank you so much!

@Cloud-Architect-Emma Cloud-Architect-Emma force-pushed the fix-custom-signal-url-v2 branch 4 times, most recently from e96f4e2 to 08c1644 Compare May 6, 2026 07:19
Comment thread android-agent/api/android-agent.api Outdated
Comment thread .gitattributes Outdated
Copy link
Copy Markdown
Contributor

@breedx-splk breedx-splk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a reasonable approach to me...thanks for the contribution @Cloud-Architect-Emma!

There are two gradlew files that should not be part of this PR, as well as the .gitattributes, so lets get this removed and then move it forward. Thanks again for your patience!

@breedx-splk
Copy link
Copy Markdown
Contributor

Oh there are some compilation failures too in the HttpEndpointConnectivityTest. I'd recommend setting up the Android SDK so that you can build and test this project on your machine. 😉

@Cloud-Architect-Emma Cloud-Architect-Emma force-pushed the fix-custom-signal-url-v2 branch 3 times, most recently from eef4aa9 to b930b22 Compare May 10, 2026 01:03
@codecov
Copy link
Copy Markdown

codecov Bot commented May 10, 2026

Codecov Report

❌ Patch coverage is 90.62500% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.06%. Comparing base (a18074b) to head (4500ff1).
⚠️ Report is 19 commits behind head on main.

Files with missing lines Patch % Lines
...oid/agent/connectivity/HttpEndpointConnectivity.kt 86.36% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1723      +/-   ##
==========================================
- Coverage   62.41%   62.06%   -0.35%     
==========================================
  Files         160      159       -1     
  Lines        3480     3451      -29     
  Branches      353      351       -2     
==========================================
- Hits         2172     2142      -30     
- Misses       1209     1210       +1     
  Partials       99       99              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Cloud-Architect-Emma
Copy link
Copy Markdown
Author

Hi @breedx-splk, all checks are now passing! I've addressed all your feedback:

  • Removed .gitattributes, gradlew.bat, and demo-app/gradlew.bat
  • Fixed compile error in HttpEndpointConnectivityTest.kt
  • Updated KDoc to note that fullUrl overrides baseUrl entirely
  • Fixed API file trailing newlines

Ready for your approval whenever you get a chance. Thank you so much for your patience throughout this whole process!

@Cloud-Architect-Emma
Copy link
Copy Markdown
Author

@breedx-splk, PR passed all checks. Can you please review at your convenience? Thnaks

Comment thread demo-app/gradlew.bat
Comment thread gradlew.bat
@Cloud-Architect-Emma Cloud-Architect-Emma force-pushed the fix-custom-signal-url-v2 branch from b930b22 to 4500ff1 Compare May 12, 2026 22:15
Copy link
Copy Markdown
Contributor

@breedx-splk breedx-splk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @Cloud-Architect-Emma! This is looking good to me now, and it's going to be useful for users to be able to customize the specific url for a given signal.

There's one result from this which is potentially odd looking, but I can't think of a better way of doing it that remains backwards compatible.

configuration = {
    httpExport {
        baseUrl = "http://10.0.2.2:4318"
        logs {
            url = "http://something.else.com"
            fullUrl = "https://something.other.net/v1/whatever"
        }
    }
...
}

I think that would be the worst case....and the solution IMO is pretty simple -- users shouldn't do that. :) Documentation is probably enough. 👍🏻

I would like the other @open-telemetry/android-maintainers to chime in as well before we merge. Thanks again for seeing this through.

Copy link
Copy Markdown
Member

@fractalwrench fractalwrench left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and thanks for the contribution. I agree that documentation should be sufficient to mitigate the comment @breedx-splk made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How can I specify a url for my logs in HttpExportConfiguration with different endpoint than v1/logs?

3 participants